package com.jerome.election.http.server;

import java.io.IOException;
import java.net.Socket;

/**
 * The processor of HttpServer requires users to implement the interface inside
 * @author Jerome
 * @date 2023/9/5
 */
public interface HttpHandler {
    /**
     * 逻辑处理
     * @param serverSocket
     */
    void handle(Socket serverSocket);

    /**
     * 异常处理
     * @param serverSocket
     * @param e
     */
    void error(Socket serverSocket, Exception e) throws IOException;
}
